#include <iostream>
using namespace std;
#include <string>

class Person{
private:
	string	name;
	int 	id;
public:
	Person(const string& name, int id);

	const string& getName() const { return this->name; }
	int getId() const { return this->id; }
};
Person::Person(const string& name, int id)
	:name(name),
	id(id)
{

}

class Student : public Person{
private:
	double 	score;
public:
	Student(const string& name, int id, double score);

	void display() const 
	{
		cout << "name: " << this->getName() << endl;
		cout << "id: " << this->getId() << endl;
		cout << "score: " << score << endl;
	}
};

Student::Student(const string& name, int id, double score)
	:Person(name, id),
	score(score)
{

}

class Teacher : public Person{
private:
	int 	teachYear;
public:	
	Teacher(const string& name, int id, int teachYear);

	void display() const 
	{
		cout << "name: " << this->getName() << endl;
		cout << "id: " << this->getId() << endl;
		cout << "teachYear: " << this->teachYear << endl;
	}
};

Teacher::Teacher(const string& name, int id, int teachYear)
	:Person(name, id),
	teachYear(teachYear)
{

}

int main(int argc, char **argv)
{
	Student jack("jack", 1001, 90);
	Teacher willian("willian", 1101, 5);

	jack.display();
	willian.display();
	return 0;
}
